package com.usian.apis.wemedia;

import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.media.dtos.WmMaterialDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

@Api(value = "自媒体素材管理",tags = "MaterialManageController",description = "素材管理API")
public interface MaterialManageControllerApi {


    /**
     *
     * @param file  MultipartFile  请求类型： post
     * @return
     */
    @ApiOperation("上传图片")
    @PostMapping("/upload")
    ResponseResult uploadPicture(@RequestPart("file") MultipartFile file);


    @ApiOperation("查询图片")
    ResponseResult findList(WmMaterialDto dto);

    @ApiOperation("根据ID删除素材")
    ResponseResult deleteByid(Integer id);

    /**
     * 取消收藏
     * @param id
     * @return
     */
    ResponseResult cancleCollectionMaterial(Integer id);

    /**
     * 收藏图片
     * @param id
     * @return
     */
    ResponseResult collectionMaterial(Integer id);

}
